package com.demo.anonymous;

public class MyConcreateClass {

	public static void main(String[] args) {
		
		MyConcreateClass concreateClass=new MyConcreateClass();
		
		
		 /*
		 Building building=new ShoppingComplext();
		 Building building2=new House();
		 */
		
		Building building=  new Building() {
			
			
			
			public void washroom() {

				 System.out.println("in showping");
				 myMethod();
			}
			
			public void myMethod(){
				System.out.println("My method.");
			}
			
		};
		

		
		 concreateClass.execteMe(building);
		 
		 
		 
	
	}
	
	
	
	
	public void execteMe(Building building){
           		 
		building.washroom();
	}
	
	
}
